home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / ipacl / pkg / postinstall < prev    next >
Encoding:
Text File  |  1992-04-29  |  710 b   |  40 lines

  1. #!/sbin/sh
  2.  
  3. TMP=/tmp/yqt.$$
  4.  
  5. cleanup() {
  6.     rm -f ${TMP}
  7.     exit 1
  8. }
  9.  
  10. #-----
  11. # Install the driver
  12. #-----
  13.  
  14. /etc/conf/bin/idinstall -d ipacc > /dev/null 2>&1
  15. cd /tmp/ipacc
  16. /etc/conf/bin/idinstall -a -k ipacc || exit 1
  17. cd /
  18. rm -rf /tmp/ipacc 
  19.  
  20. #-----
  21. # Edit /etc/ap/chan.ap
  22. #-----
  23.  
  24. trap "cleanup" 1 2 3 15
  25.  
  26. IP=`ls -l /dev/ip | sed 's/,//' | awk '{ print $6; }'`
  27. sed '/ipacc +++/,/ipacc ---/d' /etc/ap/chan.ap > ${TMP}
  28. (echo "# ipacc +++ do not edit this line"
  29. echo "# push ipacc over /dev/dip"
  30. echo "${IP}    0    255    ipacc"
  31. echo "# ipacc --- do not edit this line") >> ${TMP}
  32. cp ${TMP} /etc/ap/chan.ap
  33. rm -f ${TMP}
  34.  
  35. echo
  36. echo        Module ipacc installed.
  37. echo        You must relink your kernel to activate the modules.
  38. echo
  39. exit 0
  40.